Newspaper Archive API icon

Newspaper Archive API

(0 reviews)

Refresh image API

Refresh image API allows to generate new image URL for given page. It can be used in cases when image urls returned from search endpoint have expired and new URLs with fresh expiry time are needed.

Generate image URL

GET /paper-archive/api/v2/image-url

Example request:

curl https://api.schibsted.com/paper-archive/api/v2/image-url?pageId=123abc

and for a list

curl https://api.schibsted.com/paper-archive/api/v2/image-url?pageId=123abc&pageId=321bca&pageId=456def

The endpoint accepts following required parameters:

  • pageId - (text) - the page Id for the page that you want to fech. This also suport multiple IDs in the same request then the IDs should be sent as multiple parameters.

Additionally following parameter can be provided:

  • imageUrlValidity (int)

This parameter specifies how long the returned image URLs should be valid (in minutes). Default is 30. Maximum allowed value is 7 days.

Page search response

Example response:

[
    {
        "id": "123abc",
        "thumbnailUrl": "https://some_domain/20160726_0038_thumb.jpg?someparam",
        "imageUrl": "https://some_domain/20160726_0038_large.jpg?someparam",
    }
]

Description of fields in the response:

  • pages - the requested pages, from 0 (if page does not exist) to as many that is requested.
  • id - Unique identifier if requests page, will be same as requested.
  • thumbnailUrl, imageUrl - URLs to images representing the page. thumbnailUri points to image in low resolution intended to show as a thumbnail and imageUrl points to high resolution image intended to be shown full-screen. These URLs are valid only for limited time that is dependent on a request parameter imageUrlValidity (maximum 7 days)

Authentication and access control

Endpoints are protected by HTTP BASIC authentication. All authenticated users will have unlimited access to all data in Paper Archive.


Reviews